]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st: Introspect ScrollViewFade to read fade properties
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 13 May 2019 19:01:19 +0000 (14:01 -0500)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 15 May 2019 20:15:31 +0000 (15:15 -0500)
Util.ensureActorVisibleInScrollView takes care of the potential scroll view fade
effect in order to compute the scroll offset, reading the ScrollViewFade's
`vfade-offset` property. This was correctly working until gnome 3.30 cycle.
However such property isn't defined now because since gjs 1.54, it can only
fetch introspected properties and St.ScrollViewFade was considered a private API
not exposed by gir.

Fix this by also introspecting st-scroll-view-fade sources.
Not being considered private anymore, install the header.

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1061

src/st/meson.build

index 7263c2686375620e06c3cf1d958827dca5a22097..1097a54c85e30b51265877af0cb89814e66d07cd 100644 (file)
@@ -18,6 +18,7 @@ st_headers = [
   'st-scrollable.h',
   'st-scroll-bar.h',
   'st-scroll-view.h',
+  'st-scroll-view-fade.h',
   'st-settings.h',
   'st-shadow.h',
   'st-texture-cache.h',
@@ -73,6 +74,7 @@ st_sources = [
   'st-scrollable.c',
   'st-scroll-bar.c',
   'st-scroll-view.c',
+  'st-scroll-view-fade.c',
   'st-settings.c',
   'st-shadow.c',
   'st-texture-cache.c',
@@ -94,11 +96,6 @@ st_enums = gnome.mkenums_simple('st-enum-types',
 
 st_gir_sources = st_sources + st_private_headers + st_headers + st_enums
 
-st_non_gir_sources = [
-  'st-scroll-view-fade.c',
-  'st-scroll-view-fade.h'
-]
-
 data_to_c = find_program(meson.source_root() + '/src/data-to-c.pl')
 
 custom_target('scroll-view-fade-glsl',
@@ -123,7 +120,7 @@ st_cflags = [
 
 # Currently meson requires a shared library for building girs
 libst = shared_library('st-1.0',
-  sources: st_gir_sources + st_non_gir_sources,
+  sources: st_gir_sources,
   c_args: st_cflags,
   dependencies: [clutter_dep, gtk_dep, croco_dep, mutter_dep, m_dep],
   build_rpath: mutter_typelibdir,